
package com.feib.soeasy.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.feib.soeasy.dao.PayerDao;
import com.feib.soeasy.model.Payer;
import com.feib.soeasy.pagination.PaginatedList;
import com.feib.soeasy.service.PayerService;


/**
 * @title (#)PayerServiceImpl.java<br>
 * @description <br>
 * @author Anson Tsai<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2011/2/7 create by Anson Tsai<br>
 */
@Service("payerService")
public class PayerServiceImpl extends BaseServiceImpl implements PayerService {

    @Resource(name = "payerDao")
    private PayerDao payerDao;
    
    /*
     * (non-Javadoc)
     * @see com.feib.soeasy.service.PayerService#queryPaginationByConditions(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.feib.soeasy.pagination.PaginatedList)
     */
    @Override
    public PaginatedList<Payer> queryPaginationByConditions(String groupNo, String payerNo, String payerName, String payerPhone, String houseNumber, String payerMobile, PaginatedList<Payer> paginationConfig) {
        return payerDao.queryPaginationByConditions(groupNo, payerNo, payerName, payerPhone, houseNumber, payerMobile, paginationConfig);
    }

    /*
     * (non-Javdoc) 
     *
     * @see com.feib.soeasy.service.PayerService#getPayerByPk(java.lang.Long)
     */
    @Override
    public Payer getPayerByPk(Long payerPk) {
        return payerDao.findByPk(payerPk);
    }

    /*
     * (non-Javdoc) 
     *
     * @see com.feib.soeasy.service.PayerService#save(com.feib.soeasy.model.Payer)
     */
    @Override
    public Payer save(Payer p) {
        // TODO Auto-generated method stub
        return payerDao.save(p);
    }

    /*
     * (non-Javdoc) 
     *
     * @see com.feib.soeasy.service.PayerService#delete(com.feib.soeasy.model.Payer)
     */
    @Override
    public void delete(Payer p) {
        payerDao.delete(p);
    }

    @Override
    public Payer getPayer(String groupNo, String payerNo) {
        return payerDao.getPayer(groupNo, payerNo);
    }

}
